using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using Harlinn.Depends4Net.Utils.Assemblies;
using System.Reflection;

namespace RefCheck3 {
	static class Program {
		[STAThread]
		static void Main() {

			AppDomain dom=AppDomain.CreateDomain("test");



			FileInfo fileInfo=new FileInfo(@"\\pon-wpwb02-cl01\c$\Program Files\Next.Whs.Configuration\v1.3.0.1\Next.Whs.Configuration.dll");

			AppDomainSetup domainSetup=new AppDomainSetup();

			domainSetup.ApplicationName=fileInfo.Name;
			domainSetup.ApplicationBase=AppDomain.CurrentDomain.BaseDirectory;

			AppDomain appDomain=AppDomain.CreateDomain("ReflectionLoader",null,domainSetup);

			Loader loader=(Loader)appDomain.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName,"Harlinn.Depends4Net.Utils.Assemblies.Loader");
			loader.AddPath(fileInfo.DirectoryName);

			loader.LoadAssembly(fileInfo.FullName);
			Dictionary<string,AssemblyInfo> assemblies=loader.Assemblies;
			AssemblyInfo rootAssembly=loader.RootAssembly;

		}
	}
}